%include
:- lib(ic), lib(listut).

testMotorMotor(Path, OState, Arg, Result, NState) :-
	Path > 0,
	% Domains
	[D] :: -127 .. 128,
	[ND] :: -127 .. 128,
	% Constraints
	Arg = [D],
	NState = [ND],
	motorMotor(Path, OState, Arg, Result, NState),
	% Solving
	indomain(D),
	indomain(ND).

motorMotor(1, [], [D], [], [NDisplacement, NMan]) :-
	% Precondition
	D #> 0,
	% Postcondition
	NDisplacement #= D,
	% Invariant
	NDisplacement #>= 50.

